﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPrincipal.master" AutoEventWireup="true"
    CodeFile="VisualizarMinicursoAG.aspx.cs" Inherits="Artigo_VisualizarArtigoAG" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>Gerenciar Artigo</title>
    <link href="../Css/geral.css" rel="stylesheet" type="text/css" />
    <script src="../scripts/jquery-1.6.1.min.js" type="text/javascript"></script>
    <script src="../scripts/fswgrid-0.2.js" type="text/javascript"></script>
    <script src="../scripts/querystring-0.9.0-min.js" type="text/javascript"></script>
    <script type="text/javascript">
        function voltar()
        {
            window.location = "GerenciarMinicursoAG.aspx";
        };
        $(document).ready(function () {
            var queryStrings = $.QueryString();
            if(queryStrings != null)
            {
		        $.ajax({
		            type: "POST",
		            url: "VisualizarMinicursoAG.aspx/getMinicurso",
		            contentType: "application/json; charset=utf-8",
				    data: JSON.stringify({idMinucurso: queryStrings.i}),
		            dataType: "json",
		            success:
					        function (msg) {
                                var item = msg.d;
                                document.getElementById('labelTitulo').innerHTML = item.titulo+"<br/><br/>";
                                document.getElementById('labelDescricao').innerHTML = item.descricao+"<br/><br/>";
//                                var autores = "";
//                                for(i=0;i<item.AutoresArtigos.length;i++)
//                                {
//                                    autores += "<br/>"+item.AutoresArtigos[i].Pessoa.nome;
//                                }
//                                document.getElementById('labelAutores').innerHTML = autores+"<br/><br/>";
                                $.ajax({
		                            type: "POST",
		                            url: "VisualizarMinicursoAG.aspx/getEvento",
		                            contentType: "application/json; charset=utf-8",
				                    data: JSON.stringify({idEvento: item.idEvento}),
		                            dataType: "json",
		                            success:
					                        function (msg) {
                                                document.getElementById('labelEvento').innerHTML = msg.d.titulo+"<br/><br/>";
					                        }
		                        });
                                $.ajax({
		                            type: "POST",
		                            url: "VisualizarMinicursoAG.aspx/getMinistrantes",
		                            contentType: "application/json; charset=utf-8",
				                    data: JSON.stringify({idMinucurso: queryStrings.i}),
		                            dataType: "json",
		                            success:
					                        function (msg) {
                                                var item = msg.d;
                                                var ministrantes = "";
                                                for(i=0;i<item.length;i++)
                                                {
                                                    ministrantes += "<br/>"+item[i].Pessoa.nome;
                                                }
                                                document.getElementById('labelMinistrantes').innerHTML = ministrantes+"<br/><br/>";
					                        }
		                        });
//                                DateFormat(item.dataCadastro);
//                                document.getElementById('labelDataSubmissao').innerHTML = dateFormat+"<br/><br/>";                                
					        },
		        });
            }
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderConteudo" runat="Server">
    <table>
        <tr>
            <%--<td style="padding-right: 30px;">
                <dl>
                    <dt style="color: Blue; font-size: 15px">MENU</dt>
                    <br />
                    <dd>
                        <a href="../Evento/DefaultAG.aspx" style="border-bottom: 1px solid #F4F4F4">Principal</a>
                    </dd>
                    <dd>
                        <a href="GerenciarMinicursoAG.aspx" style="border-bottom: 1px solid #F4F4F4">Listar</a>
                    </dd>
                    <dd>
                        <a href="CadastrarMinicursoAG.aspx" style="border-bottom: 1px solid #F4F4F4">Cadastar</a>
                    </dd>
                    <dd>
                        <a href="InscreverMinicursoAG.aspx" style="border-bottom: 1px solid #F4F4F4">Inscrever</a>
                    </dd>
                </dl>
            </td>--%>
            <td style="border-left: 1px solid #EEE; padding-left: 10px">
                <div>
                    <div style="text-align: left">
                        <asp:Label runat="server" ID="LabelEventos" Font-Bold="true" Text="Detalhes do minicurso"
                            Font-Size="30px"></asp:Label>
                    </div>
                </div>
                <br />
                <br />
                <table>
                    <tr>
                        <td style="width: 40%">
                            Título:
                        </td>
                        <td style="width: 60%">
                            <label id="labelTitulo">
                            </label>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 40%">
                            Descrição:
                        </td>
                        <td style="width: 60%">
                            <div style="font-weight: bold" id="labelDescricao">
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 40%">
                            Evento:
                        </td>
                        <td style="width: 60%">
                            <label id="labelEvento">
                            </label>
                        </td>
                    </tr>
                  <%--  <tr>
                        <td style="width: 40%">
                            Ministrantes:
                        </td>
                        <td style="width: 60%">
                            <div style="font-weight: bold" id="labelMinistrantes">
                            </div>
                        </td>
                    </tr>--%>
                </table>
                <br />
                <br />
             <a id="buttonVoltar" href="javascript:history.back()" class="buttonAcao">&laquo; Voltar</a>
            </td>
        </tr>
    </table>
</asp:Content>
